matlab中的cos(n^2)为什么不对
来源:百度知道 编辑:UC知道 时间:2024/06/21 22:53:21
cos(n^2)
??? Error using ==> mpower
Matrix must be square.
>> x=cos(n*n);
??? Error using ==> mtimes
Inner matrix dimensions must agree.
我不知道应该怎么办~
请教各位大虾
我是R2007
??? Error using ==> mpower
Matrix must be square.
>> x=cos(n*n);
??? Error using ==> mtimes
Inner matrix dimensions must agree.
我不知道应该怎么办~
请教各位大虾
我是R2007
写成cos(n.^2)就可以了。。数组跟矩阵是不一样的。。
你可以给定n的值。
n=2;
x=n^2;
y=cos(x)
如果你的n值是变量的话,就在figure里看啊。可以这样:
n=-pi:0.1:pi;
y=(cos(2*n)+1)/2;
plot(n,y)
就行啦
请高手用matlab将序列 x1(n)=cos(0.46*pi*n)+sin(0.50*pi*n) 的前1O点数据作DFT
用数学归纳法证明:cos(x/2)×cos(x/2^2)×...×cos(x/2^n)=sinx/[2^n×sin(x/2^n)]
用数学归纳法证明:cos(x/2)*cos[x/(2^2)]*…*cos[x/(2^n)]=sinx/[(2^n)*sinx/(2^n)]
求Lim (2sin^n x+3cos^n x)∕(sin^n x+cos^n x) ,0≤x≤π/2
Matlab 编写函数,找出 n个数中的最大值和最小值及其所在位置
matlab 1~n随机排列
求matlab高手解答f(n)=6*n^2+6*n+31,当n<=10000时,f(n)有哪些素数?
matlab中的一元回归
matlab编程中的问题
matlab中的数据处理问题